package com.platform.dao.mybatis.impl;

import com.platform.dao.OnlineDao;
import com.platform.dao.mybatis.mapper.OnlineMapper;
import com.platform.domain.model.Online;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;


/**
* Online
*
* User: wangyang
* DateTime: 2012-10-08 16:11:49
*
*/
@Service("onlineDao")
public class OnlineDaoImpl implements OnlineDao {

    @Resource
    private OnlineMapper onlineMapper;

    /**
    *
    * 根据主键查询Online对象
    *
    * @param userId
    * @return Online对象
    */
    @Override
    public Online selectByPrimaryKey(String userId) throws Exception {
        return onlineMapper.selectByPrimaryKey(userId);
    }

    /**
    *
    * 根据查询条件查询符合条件的Online对象
    *
    * @param online
    * @return 符合条件的Online对象List
    */
    @Override
    public List<Online> select(Online online) throws Exception {
        return onlineMapper.select(online);
    }

    /**
    *
    * 根据主键删除Online对象
    *
    * @param userId
    * @return 影响条件数
    */
    @Override
    public int deleteByPrimaryKey(String userId) throws Exception {
        return onlineMapper.deleteByPrimaryKey(userId);
    }

    /**
    *
    * 根据条件删除符合条件的Online对象
    *
    * @param online
    * @return 影响条件数
    */
    @Override
    public int delete(Online online) throws Exception {
        return onlineMapper.delete(online);
    }

    /**
    *
    * 插入Online对象
    *
    * @param online
    * @return 影响条件数
    */
    @Override
    public int insert(Online online) throws Exception {
        return onlineMapper.insert(online);
    }

    /**
    *
    * 更新Online对象
    *
    * @param online
    * @return 影响条件数
    */
    @Override
    public int update(Online online) throws Exception {
        return onlineMapper.update(online);
    }
}
